<!DOCTYPE html>
<html lang="zh-cn">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>测试 / 饼图</title>
    <script src="../dist/H5Charts.js"></script>
    <style>
        #root {
            width: 400px;
            height: 400px;
            outline: 1px solid gray;
        }
    </style>
</head>

<body>
    <div id="root"></div>

    <script>


        var mychart = new H5Charts(document.getElementById("root"), {
            grid: {
                left: 100,
                right: 100,
                top: 100,
                bottom: 100
            },
            series: [{
                type: "pie",
                startAngle: 0,
                data: [
                    { value: 1048, name: 'Search Engine' },
                    { value: 735, name: 'Direct' },
                    { value: 580, name: 'Email' },
                    { value: 484, name: 'Union Ads' },
                    { value: 300, name: 'Video Ads' }
                ]
            }]
        });

        // console.log(mychart)

    </script>

</body>

</html>